let os=require("os");
export default {
    getMac(){
        let mac=''
        let networkInterfaces=os.networkInterfaces();
        for(let i in networkInterfaces){
            for(let j in networkInterfaces[i]){
                if(networkInterfaces[i][j]["family"]==="IPv4" && networkInterfaces[i][j]["mac"]!=="00:00:00:00:00:00" && networkInterfaces[i][j]["mac"] !=="00:ff:aa:bb:cc:dd" && networkInterfaces[i][j]["address"]!=="127.0.0.1"){
                    mac = networkInterfaces[i][j]["mac"]
                }
            }
        }
        console.log('mac地址是',mac) //01:02:03:0a:0b:0c
        return mac
    }
}